<head>
	<link rel="stylesheet" href="assets/css/chat.css">
	<?php
	require_once("admin/m/chat/chatjs_class.php");
	?>

</head>
<body id='popout-body' scroll="no"><section id='popout' class='body'>
				
	<section id='popout-selector'>
		<img src="assets/images/pt-player-main-header.png" width="310" height="39" alt="Pt Player Main Header">
		

		<div id='popout-communities'>


					<?PHP
					foreach($header_dropdown as $z)
					{

										foreach($z['child'] as $y)
										{
											if($y['status']='enabled')
											{

												?>
												<li class='popout-category' name='co<?PHP echo $y["id"];?>' title='Content from <?PHP echo $y["name"];?>'><?PHP echo $y["name"];?></li>
													<div class='popout-content' id='pcco<?PHP echo $y["id"];?>'>

													</div>

												<?PHP


											}

										}



					}
					?>

		</div>



	</section>
	<script src="assets/js/jpopup.js" type="text/javascript" charset="utf-8"></script>

	<script type="text/javascript">

		$('.popout-selector-back').click(function () {

			$(".popout-content").slideOut(150);
			$(".popout-selector-back").slideOut(150);

		});


		$('.popout-category').click(function () {
			var cid = $(this).attr("name");

			var community=cid.replace("co", "");
			$.ajax({ type: 'POST', url: "a/popout-community.php", data: "id="+community, context: document.body, success: function(data){
				$(".popout-content").fadeOut(150);
				$(".popout-selector-back").fadeOut(150);

				//alert("#pc"+cid);
				$("#pc"+cid).html(data);

				$("#pc"+cid).delay(500).fadeIn(150);
				$("#pb"+cid).delay(500).fadeIn(150);

				}});
		});



			$(document).ready(function(){
				$("#pcco<?PHP echo $play->piece['category'];?>").show();
				var community=<?PHP echo $play->piece['category'];?>;
				$.ajax({ type: 'POST', url: "a/popout-community.php", data: "id="+community, context: document.body, success: function(data){

					$("#pcco<?PHP echo $play->piece['category'];?>").html(data);
					$("#pcco<?PHP echo $play->piece['category'];?>").fadeIn(150);


					}});
			});

	// iniztialize player


		var flashvars = {
			'absolutePath': '<?PHP echo $conf->absolute_path;?>',
			'user_email': '<?PHP echo $_SESSION["user_email"];?>'
		};

		var params = {
			'allowfullscreen':   'true',
			'allowscriptaccess': 'always',
			'bgcolor': '#3A3A3C'
		};

		var attributes = {
			'id': 'mediaplayer',
			'name': 'mediaplayer'
		};

		swfobject.embedSWF( '<?PHP echo $conf->absolute_path;?>assets/player/<?PHP echo $play->piece["flashplayer"];?>/player.swf?<?PHP echo randomchar();?>', 'player', '620', '400', '10.1', 'false', flashvars, params, attributes);


	</script>
		<section id='popout-player'>
			<?PHP if(!$conf->chatmode)
			{

				?>


				<div id='player'>


				Javascript and Flash is Required to View this Video.


			</div>
			<?PHP
			} else { $chat_id='-chat';} ?>
	<div id='popout-discovery<?PHP echo $chat_id;?>'>

		<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=130109130382690&amp;xfbml=1"></script><fb:live-stream event_app_id="130109130382690" width="620" height="300" xid='content-<?PHP echo $cid;?>;' via_url="http://pinoytuner.com" always_post_to_friends="true"></fb:live-stream>


	</div>
	</section>






</section></body>